3.167 \(\int (a+b \tanh ^{-1}(\frac {c}{x^2})) \, dx\)

Optimal. Leaf size=44 \[ a x+b x \tanh ^{-1}\left (\frac {c}{x^2}\right )+b \sqrt {c} \tan ^{-1}\left (\frac {x}{\sqrt {c}}\right )-b \sqrt {c} \tanh ^{-1}\left (\frac {x}{\sqrt {c}}\right ) \]

[Out]

a*x+b*x*arctanh(c/x^2)+b*arctan(x/c^(1/2))*c^(1/2)-b*arctanh(x/c^(1/2))*c^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {6091, 263, 298, 203, 206} \[ a x+b x \tanh ^{-1}\left (\frac {c}{x^2}\right )+b \sqrt {c} \tan ^{-1}\left (\frac {x}{\sqrt {c}}\right )-b \sqrt {c} \tanh ^{-1}\left (\frac {x}{\sqrt {c}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[a + b*ArcTanh[c/x^2],x]

[Out]

a*x + b*Sqrt[c]*ArcTan[x/Sqrt[c]] + b*x*ArcTanh[c/x^2] - b*Sqrt[c]*ArcTanh[x/Sqrt[c]]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 263

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 298

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-(a/b), 2]], s = Denominator[Rt[-(a/b),
2]]}, Dist[s/(2*b), Int[1/(r + s*x^2), x], x] - Dist[s/(2*b), Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &
&  !GtQ[a/b, 0]

Rule 6091

Int[ArcTanh[(c_.)*(x_)^(n_)], x_Symbol] :> Simp[x*ArcTanh[c*x^n], x] - Dist[c*n, Int[x^n/(1 - c^2*x^(2*n)), x]
, x] /; FreeQ[{c, n}, x]

Rubi steps

\begin {align*} \int \left (a+b \tanh ^{-1}\left (\frac {c}{x^2}\right )\right ) \, dx &=a x+b \int \tanh ^{-1}\left (\frac {c}{x^2}\right ) \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac {c}{x^2}\right )+(2 b c) \int \frac {1}{\left (1-\frac {c^2}{x^4}\right ) x^2} \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac {c}{x^2}\right )+(2 b c) \int \frac {x^2}{-c^2+x^4} \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac {c}{x^2}\right )-(b c) \int \frac {1}{c-x^2} \, dx+(b c) \int \frac {1}{c+x^2} \, dx\\ &=a x+b \sqrt {c} \tan ^{-1}\left (\frac {x}{\sqrt {c}}\right )+b x \tanh ^{-1}\left (\frac {c}{x^2}\right )-b \sqrt {c} \tanh ^{-1}\left (\frac {x}{\sqrt {c}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 54, normalized size = 1.23 \[ a x+b x \tanh ^{-1}\left (\frac {c}{x^2}\right )+\frac {1}{2} b \sqrt {c} \left (\log \left (\sqrt {c}-x\right )-\log \left (\sqrt {c}+x\right )+2 \tan ^{-1}\left (\frac {x}{\sqrt {c}}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[a + b*ArcTanh[c/x^2],x]

[Out]

a*x + b*x*ArcTanh[c/x^2] + (b*Sqrt[c]*(2*ArcTan[x/Sqrt[c]] + Log[Sqrt[c] - x] - Log[Sqrt[c] + x]))/2

________________________________________________________________________________________

fricas [A]  time = 0.58, size = 138, normalized size = 3.14 \[ \left [\frac {1}{2} \, b x \log \left (\frac {x^{2} + c}{x^{2} - c}\right ) + b \sqrt {c} \arctan \left (\frac {x}{\sqrt {c}}\right ) + \frac {1}{2} \, b \sqrt {c} \log \left (\frac {x^{2} - 2 \, \sqrt {c} x + c}{x^{2} - c}\right ) + a x, \frac {1}{2} \, b x \log \left (\frac {x^{2} + c}{x^{2} - c}\right ) + b \sqrt {-c} \arctan \left (\frac {\sqrt {-c} x}{c}\right ) + \frac {1}{2} \, b \sqrt {-c} \log \left (\frac {x^{2} + 2 \, \sqrt {-c} x - c}{x^{2} + c}\right ) + a x\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x^2),x, algorithm="fricas")

[Out]

[1/2*b*x*log((x^2 + c)/(x^2 - c)) + b*sqrt(c)*arctan(x/sqrt(c)) + 1/2*b*sqrt(c)*log((x^2 - 2*sqrt(c)*x + c)/(x
^2 - c)) + a*x, 1/2*b*x*log((x^2 + c)/(x^2 - c)) + b*sqrt(-c)*arctan(sqrt(-c)*x/c) + 1/2*b*sqrt(-c)*log((x^2 +
 2*sqrt(-c)*x - c)/(x^2 + c)) + a*x]

________________________________________________________________________________________

giac [A]  time = 0.36, size = 57, normalized size = 1.30 \[ \frac {1}{2} \, {\left (2 \, c {\left (\frac {\arctan \left (\frac {x}{\sqrt {-c}}\right )}{\sqrt {-c}} + \frac {\arctan \left (\frac {x}{\sqrt {c}}\right )}{\sqrt {c}}\right )} + x \log \left (-\frac {\frac {c}{x^{2}} + 1}{\frac {c}{x^{2}} - 1}\right )\right )} b + a x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x^2),x, algorithm="giac")

[Out]

1/2*(2*c*(arctan(x/sqrt(-c))/sqrt(-c) + arctan(x/sqrt(c))/sqrt(c)) + x*log(-(c/x^2 + 1)/(c/x^2 - 1)))*b + a*x

________________________________________________________________________________________

maple [A]  time = 0.04, size = 39, normalized size = 0.89 \[ a x +b x \arctanh \left (\frac {c}{x^{2}}\right )-\arctanh \left (\frac {\sqrt {c}}{x}\right ) \sqrt {c}\, b +b \arctan \left (\frac {x}{\sqrt {c}}\right ) \sqrt {c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a+b*arctanh(c/x^2),x)

[Out]

a*x+b*x*arctanh(c/x^2)-arctanh(1/x*c^(1/2))*c^(1/2)*b+b*arctan(x/c^(1/2))*c^(1/2)

________________________________________________________________________________________

maxima [A]  time = 0.42, size = 51, normalized size = 1.16 \[ \frac {1}{2} \, {\left (c {\left (\frac {2 \, \arctan \left (\frac {x}{\sqrt {c}}\right )}{\sqrt {c}} + \frac {\log \left (\frac {x - \sqrt {c}}{x + \sqrt {c}}\right )}{\sqrt {c}}\right )} + 2 \, x \operatorname {artanh}\left (\frac {c}{x^{2}}\right )\right )} b + a x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x^2),x, algorithm="maxima")

[Out]

1/2*(c*(2*arctan(x/sqrt(c))/sqrt(c) + log((x - sqrt(c))/(x + sqrt(c)))/sqrt(c)) + 2*x*arctanh(c/x^2))*b + a*x

________________________________________________________________________________________

mupad [B]  time = 0.82, size = 52, normalized size = 1.18 \[ a\,x+\frac {b\,x\,\ln \left (x^2+c\right )}{2}+b\,\sqrt {c}\,\mathrm {atan}\left (\frac {x}{\sqrt {c}}\right )-\frac {b\,x\,\ln \left (x^2-c\right )}{2}+b\,\sqrt {c}\,\mathrm {atan}\left (\frac {x\,1{}\mathrm {i}}{\sqrt {c}}\right )\,1{}\mathrm {i} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a + b*atanh(c/x^2),x)

[Out]

a*x + (b*x*log(c + x^2))/2 + b*c^(1/2)*atan(x/c^(1/2)) + b*c^(1/2)*atan((x*1i)/c^(1/2))*1i - (b*x*log(x^2 - c)
)/2

________________________________________________________________________________________

sympy [A]  time = 5.14, size = 520, normalized size = 11.82 \[ a x + b \left (\begin {cases} 0 & \text {for}\: c = 0 \\- \infty x & \text {for}\: c = - x^{2} \\\infty x & \text {for}\: c = x^{2} \\- \frac {2 i c^{\frac {5}{2}} x \operatorname {atanh}{\left (\frac {c}{x^{2}} \right )}}{- 2 i c^{\frac {5}{2}} + 2 i \sqrt {c} x^{4}} + \frac {2 i \sqrt {c} x^{5} \operatorname {atanh}{\left (\frac {c}{x^{2}} \right )}}{- 2 i c^{\frac {5}{2}} + 2 i \sqrt {c} x^{4}} - \frac {2 i c^{3} \log {\left (- \sqrt {c} + x \right )}}{- 2 i c^{\frac {5}{2}} + 2 i \sqrt {c} x^{4}} - \frac {c^{3} \log {\left (- i \sqrt {c} + x \right )}}{- 2 i c^{\frac {5}{2}} + 2 i \sqrt {c} x^{4}} + \frac {i c^{3} \log {\left (- i \sqrt {c} + x \right )}}{- 2 i c^{\frac {5}{2}} + 2 i \sqrt {c} x^{4}} + \frac {c^{3} \log {\left (i \sqrt {c} + x \right )}}{- 2 i c^{\frac {5}{2}} + 2 i \sqrt {c} x^{4}} + \frac {i c^{3} \log {\left (i \sqrt {c} + x \right )}}{- 2 i c^{\frac {5}{2}} + 2 i \sqrt {c} x^{4}} - \frac {2 i c^{3} \operatorname {atanh}{\left (\frac {c}{x^{2}} \right )}}{- 2 i c^{\frac {5}{2}} + 2 i \sqrt {c} x^{4}} + \frac {2 i c x^{4} \log {\left (- \sqrt {c} + x \right )}}{- 2 i c^{\frac {5}{2}} + 2 i \sqrt {c} x^{4}} + \frac {c x^{4} \log {\left (- i \sqrt {c} + x \right )}}{- 2 i c^{\frac {5}{2}} + 2 i \sqrt {c} x^{4}} - \frac {i c x^{4} \log {\left (- i \sqrt {c} + x \right )}}{- 2 i c^{\frac {5}{2}} + 2 i \sqrt {c} x^{4}} - \frac {c x^{4} \log {\left (i \sqrt {c} + x \right )}}{- 2 i c^{\frac {5}{2}} + 2 i \sqrt {c} x^{4}} - \frac {i c x^{4} \log {\left (i \sqrt {c} + x \right )}}{- 2 i c^{\frac {5}{2}} + 2 i \sqrt {c} x^{4}} + \frac {2 i c x^{4} \operatorname {atanh}{\left (\frac {c}{x^{2}} \right )}}{- 2 i c^{\frac {5}{2}} + 2 i \sqrt {c} x^{4}} & \text {otherwise} \end {cases}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*atanh(c/x**2),x)

[Out]

a*x + b*Piecewise((0, Eq(c, 0)), (-oo*x, Eq(c, -x**2)), (oo*x, Eq(c, x**2)), (-2*I*c**(5/2)*x*atanh(c/x**2)/(-
2*I*c**(5/2) + 2*I*sqrt(c)*x**4) + 2*I*sqrt(c)*x**5*atanh(c/x**2)/(-2*I*c**(5/2) + 2*I*sqrt(c)*x**4) - 2*I*c**
3*log(-sqrt(c) + x)/(-2*I*c**(5/2) + 2*I*sqrt(c)*x**4) - c**3*log(-I*sqrt(c) + x)/(-2*I*c**(5/2) + 2*I*sqrt(c)
*x**4) + I*c**3*log(-I*sqrt(c) + x)/(-2*I*c**(5/2) + 2*I*sqrt(c)*x**4) + c**3*log(I*sqrt(c) + x)/(-2*I*c**(5/2
) + 2*I*sqrt(c)*x**4) + I*c**3*log(I*sqrt(c) + x)/(-2*I*c**(5/2) + 2*I*sqrt(c)*x**4) - 2*I*c**3*atanh(c/x**2)/
(-2*I*c**(5/2) + 2*I*sqrt(c)*x**4) + 2*I*c*x**4*log(-sqrt(c) + x)/(-2*I*c**(5/2) + 2*I*sqrt(c)*x**4) + c*x**4*
log(-I*sqrt(c) + x)/(-2*I*c**(5/2) + 2*I*sqrt(c)*x**4) - I*c*x**4*log(-I*sqrt(c) + x)/(-2*I*c**(5/2) + 2*I*sqr
t(c)*x**4) - c*x**4*log(I*sqrt(c) + x)/(-2*I*c**(5/2) + 2*I*sqrt(c)*x**4) - I*c*x**4*log(I*sqrt(c) + x)/(-2*I*
c**(5/2) + 2*I*sqrt(c)*x**4) + 2*I*c*x**4*atanh(c/x**2)/(-2*I*c**(5/2) + 2*I*sqrt(c)*x**4), True))

________________________________________________________________________________________